<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: tranimate</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: tranimate</td>
      <td class="subheader-left"><a href="matlab:open tranimate">View code for tranimate</a></td>
    </tr>
  </table>
<h1>tranimate</h1><p><span class="helptopic">Animate a coordinate frame</span></p><p>
<span style="color:red">tranimate</span>(<strong>p1</strong>, <strong>p2</strong>, <strong>options</strong>) animates a 3D coordinate frame moving from pose X1
to pose X2.  Poses X1 and X2 can be represented by:

</p>
<ul>
  <li>homogeneous transformation matrices (4x4)</li>
  <li>orthonormal rotation matrices (3x3)</li>
  <li>Quaternion</li>
</ul>
<p>
<span style="color:red">tranimate</span>(<strong>x</strong>, <strong>options</strong>) animates a coordinate frame moving from the identity pose
to the pose <strong>x</strong> represented by any of the types listed above.

</p>
<p>
<span style="color:red">tranimate</span>(<strong>xseq</strong>, <strong>options</strong>) animates a trajectory, where <strong>xseq</strong> is any of

</p>
<ul>
  <li>homogeneous transformation matrix sequence (4x4xN)</li>
  <li>orthonormal rotation matrix sequence (3x3xN)</li>
  <li>Quaternion vector (Nx1)</li>
</ul>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1">'fps',  fps</td> <td>Number of frames per second to display (default 10)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'nsteps',  n</td> <td>The number of steps along the path (default 50)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'axis', A</td> <td>Axis bounds [xmin, xmax, ymin, ymax, zmin, zmax]</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'movie', M</td> <td>Save frames as files in the folder M</td></tr>
</table>
<p>
Additional options are passed through to TRPLOT.

</p>
<h2>Notes</h2>
<ul>
  <li>Uses the Animate helper class to record the frames.</li>
  <li>Poses X1 and X2 must both be of the same type</li>
  <li>The 'movie' options saves frames as files NNNN.png.</li>
  <li>To convert frames to a movie use a command like:</li>
</ul>
<pre style="width: 90%%;" class="examples">
ffmpeg&nbsp;-r&nbsp;10&nbsp;-i&nbsp;%04d.png&nbsp;out.avi
</pre>
<h2>See also</h2>
<p>
<a href="trplot.html">trplot</a>, <a href="Animate.html">Animate</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>